-
Notifications
You must be signed in to change notification settings - Fork 2
修改支持udp、ws等协议 #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
修改支持udp、ws等协议 #15
Conversation
修改支持udp、ws等协议 新增from_socket函数 支持从stream启动
|
Hi @YDHCUI ! Thanks for the contribution. Few things we will need to address before merge: 1. cargo clippy and cargo fmt need to pass2. Performance Regression: Boxing StreamsFiles: Before: read_stream: tokio::net::tcp::OwnedReadHalf,
write_stream: Arc<tokio::sync::Mutex<tokio::net::tcp::OwnedWriteHalf>>,After: read_stream: Box<dyn AsyncRead + Unpin + Send + Sync>,
write_stream: Arc<tokio::sync::Mutex<Box<dyn AsyncWrite + Unpin + Send + Sync>>>,Issue: Every read/write operation now goes through:
For a VNC server performing thousands of small I/O operations per second, this adds measurable overhead. The original concrete types allowed the compiler to inline and optimize I/O calls. 3. Performance Regression:
|
dustinmcafee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your addition! I really like the idea -- few requested fixes, however -- Please check previous Conversation comment.
修改支持udp、ws等协议
新增from_socket函数 支持从stream启动